function [ADD] = matrix_add2(N_bit,series)
% function [ADD1,ADD2,ADD3] = matrix_add(N_bit,series)
%蝶形运算矩阵和数据地址误差运算
%   Detailed explanation goes here
%方法1
ADD1 = zeros(3,2^(N_bit-1));
NX = 2^(N_bit-series-1);
NY = 2^series;
m=1:2^series;
K=1:2^series;
for B=1:NX
    for L=1:2
        ADD1(L,K) = m-1;
        m=m+2^series;
    end
    ADD1(3,(B-1)*NY+1:B*NY) = 0:NY-1;
    K=K+2^series;
end
%%
ADD = ADD1;
end